<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*, java.io.*, java.util.*, database.*" %>
<jsp:useBean id="con" class="database.DatabaseConnection"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Add Data of Rim</title>
        <style type="text/css">
            <!--
            body {
                background-image: url(../../image/3110_background/backcolor3.jpg);
                background-repeat: repeat;
            }
            -->
    </style></head>

    <body>

        <script language="javascript">
            function check()
            {
                if(document.all.textfield.value=="") {
                    alert('Please enter Tire Width:!');
                    document.all.textfield.focus();
                    return false;
                }
                if(document.all.textfield2.value=="") {
                    alert('Please enter Aspect Ratio!');
                    document.all.textfield2.focus();
                    return false;
                }
                if(document.all.textfield3.value=="") {
                    alert('Please enter Rim Diameter!');
                    document.all.textfield3.focus();
                    return false;
                }
                if(document.all.textfield4.value=="") {
                    alert('Please enter Metric Tire!');
                    document.all.textfield4.focus();
                    return false;
                }
                if(document.all.textfield5.value=="") {
                    alert('Please enter Rim ID!');
                    document.all.textfield5.focus();
                    return false;
                }

            }
        </script>

        <%
        String Tire_Width = request.getParameter("Tire_Width");
        String Aspect_Ratio = request.getParameter("Aspect_Ratio");


        con.createConnection();

        if (Tire_Width != null || Aspect_Ratio != null) {
        }

        %>
        <form id="form1" name="form1" method="post" action="AddDate.jsp" onclick="return check();">
            <table width="404" border="1" align="center">
                <tr>
                    <td colspan="2" align="center" valign="middle">Add Data of Rim</td>
                </tr>
                <tr>
                    <td width="122" align="center" valign="middle" nowrap="nowrap">Tire Width:</td>
                    <td width="266"><input type="text" name="textfield" id="textfield" /></td>
                </tr>
                <tr>
                    <td align="center" valign="middle" nowrap="nowrap">Aspect Ratio:</td>
                    <td><input type="text" name="textfield2" id="textfield2" /></td>
                </tr>
                <tr>
                    <td align="center" valign="middle" nowrap="nowrap">Rim Diameter:</td>
                    <td><input type="text" name="textfield3" id="textfield3" /></td>
                </tr>
                <tr>
                    <td align="center" valign="middle" nowrap="nowrap">Metric Tire:</td>
                    <td><input type="text" name="textfield4" id="textfield4" /></td>
                </tr>
                <tr>
                    <td align="center" valign="middle" nowrap="nowrap">Rim ID :</td>
                    <td><input type="text" name="textfield5" id="textfield5" /></td>
                </tr>

                <tr>
                    <td colspan="2" align="center" valign="middle" nowrap="nowrap"><input type="submit" name="button" id="button" value="Submit" />
                    <input type="reset" name="button2" id="button2" value="Reset" /></td>
                </tr>
            </table>
        </form>
    </body>
</html>
